/**
 * Created by yangfan on 2016/10/12.
 */
define(['config/appregister',
    "i18n",
    "business/services/constant",
    "business/services/personCenterComp",
    "business/services/detailNavComp",
    "business/services/filter"],function(app,i18n,constant){
    app.controller('myResumeCtrl', function($scope,$state,setUrl) {
        $scope.i18n = i18n;
        $scope.isMyResume = true;
        $scope.leftNav = [
            {title:"我的简历",state:"resume.myResume"},
            {title:"投递的简历",state:"resume.posted"},
            {title:"收藏的职位",state:"resume.collectJob"},
            {title:"搜索职位",state:"resume.searchJob"}
        ];
        //   $state.go("prosonMine.myUpload");
        $scope.currentItem = [];
        $scope.changeView = function(item,index){
            $scope.currentItem = [];
            $scope.currentItem[index] = true;
            if(typeof item.state=="string" &&item.state!=""){
                $state.go(item.state);
            }
        };
        $scope.goPreview = function(state,para){
            if(!state){
                return
            }
           var url = $state.href(state,para);
            window.open(setUrl.getUrl(url),'_blank');

        };
        $scope.jumpTo = function(state,params){
            //跳转到职位详情
            $state.go(state,params);
        }
      //  $scope.goTo("resume.posted");
        $scope.currentItem[1] = true;
        $scope.goToPage = function(state){
            $state.go(state);
        }


    })
});